<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<style type="text/css">
			* {
				padding: 0;
				margin: 0;
			}
			body{
				position: relative;
			}
			#txt{
				position: absolute;
				top: 5px;
				left: 10px;
				font-size: 20px;
			}
		</style>
	</head>

	<body>
         <img src="img/game.png"/ width="100%" height="100%" id="begin">
		 <canvas id="canvas" style="display: none;"></canvas>
	</body>
	<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
	    <!--判断设备类型-->
    <script src="js/判断设备类型的.js" type="text/javascript" charset="utf-8"></script>
    <!--图片预加载-->	
	<script src="js/图片预加载.js" type="text/javascript" charset="utf-8"></script>
	<!--准备-->
    <script src="js/准备工作.js" type="text/javascript" charset="utf-8"></script>
	<!--背景-->
	<script src="js/背景.js" type="text/javascript" charset="utf-8"></script>
	<!--计分-->
	<!--<script src="js/计分.js" type="text/javascript" charset="utf-8"></script>-->
	<!--飞机-->
	<script src="js/飞机.js" type="text/javascript" charset="utf-8"></script>
	<!--子弹-->
    <script src="js/子弹.js" type="text/javascript" charset="utf-8"></script>	
	
	<script type="text/javascript">
		var background = new BackgroundClass();
		background.drawBack();
		
		var plane = new plane();
		plane.drawPlane();
		var bulletControlle = new BulletControllerClass();
		setInterval(function(){
			context.clearRect(0,0,canvas.width,canvas.height);
			background.backgroundMove(10);
			plane.movePlane(5);
//			plane.drawPlane();
			bulletControlle.moveBullet(plane);
		},50);
		
		var begin = document.getElementById("begin");
		
		begin.onclick = function(){
			begin.style.display = "none";
			canvas.style.display = "block";
		}
		
	</script>
</html>
